package com.qf.petmall.starter.localstores.controller;


import com.qf.petmall.starter.localstores.entity.Localstores;
import com.qf.petmall.starter.localstores.service.ILocalstoresService;
import com.qf.petmall.starter.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 本地商城 前端控制器
 * </p>
 *
 * @author Zhong_
 * @since 2022-12-06
 */
@CrossOrigin
@RestController
@RequestMapping("/localstores")
public class LocalstoresController {

    @Autowired
    ILocalstoresService localstoresService;

    @GetMapping("/page")
    public R localstores(Integer pageNum, Integer limit){

        List<Localstores> list = localstoresService.getPage(pageNum,limit);

        return R.ok().put("localstores",list);

    }

}
